1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus used with a printer, a scanner, a duplicator, a facsimile, etc. for reproducing the multivalued image information as a binary image.
2. Description of the Related Art
The error spreading method is widely known as one of the methods for converting a multivalued image into a binary image.
FIG. 5 is a block diagram showing a conventional circuit for executing the error spreading method.
In FIG. 5, the multlvalued data D of an intended pixel to be binarized is read from an image memory 100, and subjected to γ correction into the multivalued data corresponding to the printing characteristics of an output device such as a printer with reference to the correction data stored in a γ correction ROM 101. The error data E of the intended pixel is added to the multivalued data D′ subjected to γ correction by an adder 102 of an error spread processing unit 107, so that F=D′+E is output.
The data F of the intended pixel to which the error data has been added is compared with a binary threshold value Th in a comparator 104, and in the case where F≧Th, a binary signal B=“1” is output, while in the case where F<Th, a binary signal B=“0” is output. From this output result, the binarization error E′ is calculated as E′=F−B′ by a subtractor 106.
In the case where the input data has 256 tones (0 to 255), B′=B×255. In the case where the input multivalued data D is 230 and the binarization threshold value Th is 128, for example, the output data after binarization is B=1, so that the binarization error E′ is given as E′=D−B×255=230−1×255=−25.
This binarization error E is stored in an error memory 103 in order to distribute it among the data of the pixels subsequently processed in accordance with a predetermined error matrix Mxy in a weighted error calculator 105, and added to the multivalued data of the next pixel by an adder 102, thereby transmitting the error data.
Specifically, in the case under consideration involving the input multivalued data D of 230, the comparison with the binarization threshold Th=128 shows that the output data after binarization is 1 corresponding to 255 out of 256 tones. Thus, an error of 25 develops with respect to 230 of the input multivalued data D. The error 25 with respect to the input multivalued data D of 230 is determined as a binarization error and distributed to the error memory 103 of unprocessed pixels by the weighted error calculator 105 using an error matrix and thus reflected in the subsequent pixel binarization.
The error matrix used in the conventional error spreading method is shown in FIG. 6.
In FIG. 6, the pixel indicated by * is the existing intended pixel to be binarized.
The error generated in binarizing this intended pixel is distributed to the unprocessed the next pixels with the weighting coefficients (7, 1, 5, 3) shown in FIG. 6. In binarizing the intended pixel indicated by *, the error distribution value stored is read from the error memory 103, and the next input value read from the image memory 100 is corrected using this error distribution value.
As described above, according to the error spreading method, the binarization error for a given pixel is distributed to the pixel data to be subsequently binarized thereby to minimize the error between the image data after binarization data and the original multivalued image data.
The image binarized by the error spreading method poses the problem of the reproducibility of the edge portion of the binarized image due to the fact that the error is distributed to the surrounding pixels. In other words, since the information of the surrounding pixels is partly added to the intended pixel, the reproducibility of the edge portion of the image is deteriorated.
The conventional approach to this problem is a method of improving the edge retention by emphasizing the edge portion of the original multivalued data through a high-pass filter or the like.
This method, however, gives rise to a new problem of the image quality deterioration with the whole image affected by the filtering, and therefore fails to solve the problem in the true sense of the words.